<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_userFragment :: head(~{::title})">
    <meta charset="UTF-8">
    <title>资助申请</title>
    <link rel="stylesheet" href="../static/layui/css/layui.css">
    <link rel="stylesheet" href="../static/css/main.css">
    <script src="../static/layui/layui.js"></script>
</head>
<body>
    <!--头部导航部分-->
    <div class="header" th:replace="_userFragment :: topmenu">
        <div class="layui-col-md10">
            <span id="header-font">贫困生资助系统</span>
        </div>
        <ul class="layui-nav layui-col-md2">
            <li class="layui-nav-item" style="float: right">
                <a href=""><img src="//t.cn/RCzsdCq" class="layui-nav-img">我</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;">修改信息</a></dd>
                    <dd><a href="javascript:;">安全管理</a></dd>
                    <dd><a href="javascript:;">退了</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <!--主要内容部分-->
    <div class="layui-row">
        <!--左侧导航-->
        <ul  th:replace="_userFragment :: leftmenu(5)" class="layui-nav layui-nav-tree  layui-col-md2" lay-filter="demo" style="height: 662px">
            <li class="layui-nav-item layui-nav-itemed">
                <a href="javascript:;"><i class="layui-icon">&#xe770;</i> 个人中心</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;">我的申请</a></dd>
                    <dd><a href="javascript:;">用户信息</a></dd>
                    <dd><a href="studentInfo.html">学生信息</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="layui-icon">&#xe6b2;</i> 经济困难认定</a>
                <dl class="layui-nav-child">
                    <dd ><a href="javascript:;">经济困难认定申请</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item layui-nav-itemed" >
                <a href="javascript:;"><i class="layui-icon">&#xe857;</i> 资助管理</a>
                <dl class="layui-nav-child">
                    <dd class="layui-this"><a href="javascript:;">申请资助</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item">
                <a href="javascript:;"><i class="layui-icon">&#xe631;</i> 系统管理</a>
                <dl class="layui-nav-child">
                    <dd><a href="javascript:;">修改密码</a></dd>
                </dl>
            </li>
        </ul>
        <!--右侧内容-->
        <div class="layui-col-md10">
            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
                <legend>资助申请</legend>
            </fieldset>
            <form class="layui-form" action="" th:action="@{/supportApply}">
                <div class="layui-form-item" style="margin-left: 5px">
                    资源名：
                    <div class="layui-inline">
                        <input class="layui-input" name="resourceName" id="resourceNameSearch">
                    </div>
                    <button class="layui-btn" lay-submit>搜索</button>
                </div>
            </form>
            <!--表格-->
            <table class="layui-table">
                <thead>
                <tr>
                    <th>资源名</th>
                    <th>创建时间</th>
                    <th style="width: 450px">资源描述</th>
                    <th>资源级别</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="resources,Iterable:${resourceApplyVOPage.records}">
                    <td th:text="${resources.resourceName}">国家助学金</td>
                    <td th:text="${#dates.format(resources.resourceTime,'yyyy-MM-dd HH:mm')}">2016-11-29</td>
                    <td><div class="tdDiv" th:text="${resources.resourceInfo}"> 人生就像是一场修行</div></td>
                    <td th:text="${resources.resourceLevel}">国家</td>
                    <td>
                        <a th:if="${!resources.flag}" href="#" th:href="@{/clickSupportApply/}+${resources.resourceId}" type="button" class="layui-btn layui-btn-sm layui-btn-normal">申请</a>
                        <span th:if="${resources.flag}">已申请</span>
                    </td>
                </tr>
                </tbody>
            </table>
            <div class="layui-btn-group " style="float: right">
                <a href="#" th:href="@{/supportApply(resourceName=${resourceName})}" type="button" class="layui-btn layui-btn-primary" >首页</a>
                <a href="#" th:href="@{/supportApply(currentPage=${resourceApplyVOPage.current}-1,totalPage=${resourceApplyVOPage.pages},resourceName=${resourceName})}" type="button" class="layui-btn layui-btn-primary">上一页</a>
                <a href="#" th:href="@{/supportApply(currentPage=${resourceApplyVOPage.current}+1,totalPage=${resourceApplyVOPage.pages},resourceName=${resourceName})}" type="button" class="layui-btn layui-btn-primary">下一页</a>
                <a href="#" th:href="@{/supportApply(currentPage=${resourceApplyVOPage.pages},resourceName=${resourceName})}" type="button" class="layui-btn layui-btn-primary">尾页</a>
            </div>
        </div>
    </div>




</body>
<script>
    layui.use('element', function(){
    });
    layui.use('form', function(){
    });
    //弹出消息
    layui.use('layer', function(){
        var layer = layui.layer;
        var msg = "[[${msg}]]";
        if (msg!=null&&msg!=""){
            layer.msg(msg);
        }
    });

</script>
</html>